package com.fingard.dsp.bank.reqrespobj.transaction;

import com.fingard.constant.Format;
import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.xml.XmlTextReader;

import java.text.ParseException;
import java.util.Date;

public class ReqTransactionReplenish extends RequestBase {

    public String actNum="";
    public String dateFrom = "";
    public String dateTo = "";

    private XmlTextReader xmlReader;

    public ReqTransactionReplenish(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception{
        reqHeader = p_header;
        xmlReader = p_xmlReader;
        actNum = xmlReader.getSimpleText("ActNum");
        dateFrom = xmlReader.getSimpleText("DateFrom");
        dateTo = xmlReader.getSimpleText("DateTo");
    }
    public Date getDateFrom() throws ParseException {
        return Format.Date8Format.parse(dateFrom);
    }

    public Date getDateTo() throws ParseException{
        return Format.Date8Format.parse(dateTo);
    }
}
